package com.juyu.miliao.api.controller;

import com.juyu.miliao.api.service.BillDetailIntegralService;
import com.juyu.miliao.common.domain.vo.IntegralRewardsAndPunishmentsVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author xuanqicheng
 */
@RestController
@RequestMapping("/billDtailIntegral")
public class BillDetailIntegralController {

    @Autowired
    private BillDetailIntegralService billDetailIntegralService;

    /**
     * 积分说明 1.通话获得,2:行为获得,3:钻石获得,4:通话扣除,5:违规扣除
     * @param type
     * @return
     */
    @GetMapping("/{type}")
    public List<IntegralRewardsAndPunishmentsVO> getList(@PathVariable("type") int type){
        List<IntegralRewardsAndPunishmentsVO> list = billDetailIntegralService.getListByType(type);
        return list;
    }
}
